//
//  TEImages.m
//  TintExample
//
//  Created by Kevin Wu on 2/26/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import "TEImages.h"

NSArray *TEBigImageNameArray(void) {
    return [NSArray arrayWithObjects:
     @"b1.jpg", 
     @"b2.jpg", 
     @"b3.jpg", 
     @"b4.jpg", 
     @"b5.jpg", 
     @"b6.jpg", 
     @"b7.jpg", 
     @"b8.jpg", 
     @"b9.jpg", 
     @"b10.jpg", 
     @"b11.jpg", 
     @"b12.jpg", 
     @"b13.jpg", 
     @"b14.jpg", 
     @"b15.jpg", 
     @"b16.jpg", 
     @"b17.jpg", 
     @"b18.jpg", 
     @"b19.jpg", 
     @"b20.jpg", 
     @"b21.jpg", 
     @"b22.jpg", 
     @"b23.jpg", 
     @"b24.jpg", 
     @"b25.jpg", 
     @"b26.jpg", 
     @"b27.jpg", 
     @"b28.jpg", 
     @"b29.jpg", 
     @"b30.jpg", nil];
}

NSArray *TESmallImageNameArray(void) {
    return [NSArray arrayWithObjects:
            @"s1.jpg", 
            @"s2.jpg", 
            @"s3.jpg", 
            @"s4.jpg", 
            @"s5.jpg", 
            @"s6.jpg", 
            @"s7.jpg", 
            @"s8.jpg", 
            @"s9.jpg", 
            @"s10.jpg", 
            @"s11.jpg", 
            @"s12.jpg", 
            @"s13.jpg", 
            @"s14.jpg", 
            @"s15.jpg", 
            @"s16.jpg", 
            @"s17.jpg", 
            @"s18.jpg", 
            @"s19.jpg", 
            @"s20.jpg", 
            @"s21.jpg", 
            @"s22.jpg", 
            @"s23.jpg", 
            @"s24.jpg", 
            @"s25.jpg", 
            @"s26.jpg", 
            @"s27.jpg", 
            @"s28.jpg", 
            @"s29.jpg", 
            @"s30.jpg", nil];
}

NSArray *TEImageNameArray(void) {
    NSArray *big = TEBigImageNameArray();
    NSArray *small = TESmallImageNameArray();
    
    NSUInteger a = [big count];
    NSUInteger b = [small count];
    NSUInteger count = MAX(a, b);
    
    NSMutableArray *tmp = [NSMutableArray array];
    for (int i=0; i<count; ++i) {
        [tmp addObjectIfNotNil:[small objectOrNilAtIndex:i]];
        [tmp addObjectIfNotNil:[big objectOrNilAtIndex:i]];
    }
    return [NSArray arrayWithArray:tmp];
}








NSArray *TEBigImagePathArray(void) {
    NSArray *names = TEBigImageNameArray();
    
    NSUInteger count = [names count];
    
    NSMutableArray *tmp = [NSMutableArray array];
    for (int i=0; i<count; ++i) {
        NSString *name = [names objectAtIndex:i];
        NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:nil];
        [tmp addObjectIfNotNil:path];
    }
    
    return [NSArray arrayWithArray:tmp];
}

NSArray *TESmallImagePathArray(void) {
    NSArray *names = TESmallImageNameArray();
    
    NSUInteger count = [names count];
    
    NSMutableArray *tmp = [NSMutableArray array];
    for (int i=0; i<count; ++i) {
        NSString *name = [names objectAtIndex:i];
        NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:nil];
        [tmp addObjectIfNotNil:path];
    }
    return [NSArray arrayWithArray:tmp];
}

NSArray *TEImagePathArray(void) {
    NSArray *names = TEImageNameArray();
    
    NSUInteger count = [names count];
    
    NSMutableArray *tmp = [NSMutableArray array];
    for (int i=0; i<count; ++i) {
        NSString *name = [names objectAtIndex:i];
        NSString *path = [[NSBundle mainBundle] pathForResource:name ofType:nil];
        [tmp addObjectIfNotNil:path];
    }
    return [NSArray arrayWithArray:tmp];
}







NSArray *TEBigImageURLArray(void) {
    return [NSArray arrayWithObjects:
            @"http://farm8.staticflickr.com/7057/6782359652_41a773390f_o.jpg", 
            @"http://farm8.staticflickr.com/7203/6782359662_e5d39dddf3_o.jpg", 
            @"http://farm8.staticflickr.com/7199/6928480121_c2a0883002_o.jpg", 
            @"http://farm8.staticflickr.com/7068/6928480073_c675a96750_o.jpg", 
            @"http://farm8.staticflickr.com/7063/6928485531_c8fcc74f9a_o.jpg", 
            @"http://farm8.staticflickr.com/7182/6928487887_6d32ed9794_o.jpg", 
            @"http://farm8.staticflickr.com/7055/6928497097_b66f830375_o.jpg", 
            @"http://farm8.staticflickr.com/7207/6782376358_6e1d253958_o.jpg", 
            @"http://farm8.staticflickr.com/7062/6782376148_fb566a4279_o.jpg", 
            @"http://farm8.staticflickr.com/7061/6928505759_82619bdd25_o.jpg", 
            @"http://farm8.staticflickr.com/7210/6782394858_7b272290d3_o.jpg", 
            @"http://farm8.staticflickr.com/7187/6782397988_290d508f3d_o.jpg", 
            @"http://farm8.staticflickr.com/7184/6782397940_4372d3ce29_o.jpg", 
            @"http://farm8.staticflickr.com/7189/6928517907_ddd925d27a_o.jpg", 
            @"http://farm8.staticflickr.com/7038/6782405544_2183f90480_o.jpg", 
            @"http://farm8.staticflickr.com/7184/6782410144_249f0a54cd_o.jpg", 
            @"http://farm8.staticflickr.com/7063/6928533461_6b2ef764f4_o.jpg", 
            @"http://farm8.staticflickr.com/7190/6928533495_349caba974_o.jpg", 
            @"http://farm8.staticflickr.com/7067/6782413544_acb817df1b_o.jpg", 
            @"http://farm8.staticflickr.com/7058/6928533531_55b1c1663e_o.jpg", 
            @"http://farm8.staticflickr.com/7046/6782419414_4462fe11be_o.jpg", 
            @"http://farm8.staticflickr.com/7050/6782419378_fde752067d_o.jpg", 
            @"http://farm8.staticflickr.com/7185/6928540429_817923ddfa_o.jpg", 
            @"http://farm8.staticflickr.com/7186/6928540521_222309ecc8_o.jpg", 
            @"http://farm8.staticflickr.com/7180/6928553925_cc0dd767d5_o.jpg", 
            @"http://farm8.staticflickr.com/7065/6928548217_429f0f8785_o.jpg", 
            @"http://farm8.staticflickr.com/7201/6928548211_e6d83f6977_o.jpg", 
            @"http://farm8.staticflickr.com/7048/6928553873_fde83284fa_o.jpg", 
            @"http://farm8.staticflickr.com/7057/6782439240_e0b472ee11_o.jpg", 
            @"http://farm8.staticflickr.com/7205/6782441872_b63d378f6d_o.jpg",  nil];
}

NSArray *TESmallImageURLArray(void) {
    return [NSArray arrayWithObjects:
            @"http://farm8.staticflickr.com/7066/6779640028_cee9a0c092_z.jpg", 
            @"http://farm8.staticflickr.com/7057/6779640016_f16f949796_z.jpg", 
            @"http://farm8.staticflickr.com/7207/6779640046_74ea6616ed_z.jpg", 
            @"http://farm8.staticflickr.com/7201/6779640036_c7283bc3e4_z.jpg", 
            @"http://farm8.staticflickr.com/7049/6779640030_d8d973c296_z.jpg", 
            @"http://farm8.staticflickr.com/7040/6779640092_3eb45c6bef_z.jpg", 
            @"http://farm8.staticflickr.com/7207/6925756087_2905daafc9_z.jpg", 
            @"http://farm8.staticflickr.com/7054/6779661272_f4952528b5_z.jpg", 
            @"http://farm8.staticflickr.com/7179/6779661282_5dd7bb2ccf_z.jpg", 
            @"http://farm8.staticflickr.com/7063/6779661284_0294882040_z.jpg", 
            @"http://farm8.staticflickr.com/7065/6925777463_10e11e7dda_z.jpg", 
            @"http://farm8.staticflickr.com/7049/6925777441_0f7586577a_z.jpg", 
            @"http://farm8.staticflickr.com/7176/6925777421_90641d6e92_z.jpg", 
            @"http://farm8.staticflickr.com/7187/6925777375_549f5a9627_z.jpg", 
            @"http://farm8.staticflickr.com/7204/6779668548_70f2870553_z.jpg", 
            @"http://farm8.staticflickr.com/7207/6908653695_dba05d412e_z.jpg", 
            @"http://farm8.staticflickr.com/7036/6925784423_54f489029d_z.jpg", 
            @"http://farm8.staticflickr.com/7061/6925784463_64ec5e1e16_z.jpg", 
            @"http://farm8.staticflickr.com/7060/6925784497_45118cce7b_z.jpg", 
            @"http://farm8.staticflickr.com/7197/6925784519_8cd3539fae_z.jpg", 
            @"http://farm8.staticflickr.com/7177/6937717443_bba5d53b78_z.jpg", 
            @"http://farm8.staticflickr.com/7200/6925790441_6a668c973f_z.jpg", 
            @"http://farm8.staticflickr.com/7061/6925790461_0111983dbc_z.jpg", 
            @"http://farm8.staticflickr.com/7065/6779674856_117fa8649e_z.jpg", 
            @"http://farm8.staticflickr.com/7177/6779674846_bfe4df470a_z.jpg", 
            @"http://farm8.staticflickr.com/7201/6779680042_2a295485d1_z.jpg", 
            @"http://farm8.staticflickr.com/7195/6925795627_3b2e87d572_z.jpg", 
            @"http://farm8.staticflickr.com/7187/6925795593_c1dfd5c2dc_z.jpg", 
            @"http://farm8.staticflickr.com/7057/6791600328_bf471cbce2_z.jpg", 
            @"http://farm8.staticflickr.com/7062/6779680078_9d9d09fd7c_z.jpg", nil];
}

NSArray *TEImageURLArray(void) {
    NSArray *big = TEBigImageURLArray();
    NSArray *small = TESmallImageURLArray();
    
    NSUInteger a = [big count];
    NSUInteger b = [small count];
    NSUInteger count = MAX(a, b);
    
    NSMutableArray *tmp = [NSMutableArray array];
    for (int i=0; i<count; ++i) {
        [tmp addObjectIfNotNil:[small objectOrNilAtIndex:i]];
        [tmp addObjectIfNotNil:[big objectOrNilAtIndex:i]];
    }
    return [NSArray arrayWithArray:tmp];
}

